Integrand size = 28, antiderivative size = 202 \[ \int \frac {1}{(a+i a \tan (e+f x)) (c+d \tan (e+f x))^2} \, dx=\frac {\left (c^3+3 i c^2 d+3 c d^2-3 i d^3\right ) x}{2 a (c-i d)^2 (c+i d)^3}+\frac {(3 c-i d) d^2 \log (c \cos (e+f x)+d \sin (e+f x))}{a (i c-d)^3 (c-i d)^2 f}+\frac {(c-3 i d) d}{2 a (c-i d) (c+i d)^2 f (c+d \tan (e+f x))}-\frac {1}{2 (i c-d) f (a+i a \tan (e+f x)) (c+d \tan (e+f x))} \]
[Out]
Time = 0.41 (sec) , antiderivative size = 202, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3633, 3610, 3612, 3611} \[ \int \frac {1}{(a+i a \tan (e+f x)) (c+d \tan (e+f x))^2} \, dx=\frac {x \left (c^3+3 i c^2 d+3 c d^2-3 i d^3\right )}{2 a (c-i d)^2 (c+i d)^3}+\frac {d^2 (3 c-i d) \log (c \cos (e+f x)+d \sin (e+f x))}{a f (-d+i c)^3 (c-i d)^2}+\frac {d (c-3 i d)}{2 a f (c-i d) (c+i d)^2 (c+d \tan (e+f x))}-\frac {1}{2 f (-d+i c) (a+i a \tan (e+f x)) (c+d \tan (e+f x))} \]
[In]
[Out]
Rule 3610
Rule 3611
Rule 3612
Rule 3633
Rubi steps \begin{align*} \text {integral}& = -\frac {1}{2 (i c-d) f (a+i a \tan (e+f x)) (c+d \tan (e+f x))}+\frac {\int \frac {a (i c-3 d)+2 i a d \tan (e+f x)}{(c+d \tan (e+f x))^2} \, dx}{2 a^2 (i c-d)} \\ & = \frac {(c-3 i d) d}{2 a (c-i d) (c+i d)^2 f (c+d \tan (e+f x))}-\frac {1}{2 (i c-d) f (a+i a \tan (e+f x)) (c+d \tan (e+f x))}+\frac {\int \frac {-a \left (3 c d-i \left (c^2+2 d^2\right )\right )+a d (i c+3 d) \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{2 a^2 (i c-d) \left (c^2+d^2\right )} \\ & = \frac {\left (c^3+3 i c^2 d+3 c d^2-3 i d^3\right ) x}{2 a (c-i d)^2 (c+i d)^3}+\frac {(c-3 i d) d}{2 a (c-i d) (c+i d)^2 f (c+d \tan (e+f x))}-\frac {1}{2 (i c-d) f (a+i a \tan (e+f x)) (c+d \tan (e+f x))}-\frac {\left ((3 c-i d) d^2\right ) \int \frac {d-c \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{a (i c-d) \left (c^2+d^2\right )^2} \\ & = \frac {\left (c^3+3 i c^2 d+3 c d^2-3 i d^3\right ) x}{2 a (c-i d)^2 (c+i d)^3}+\frac {(3 c-i d) d^2 \log (c \cos (e+f x)+d \sin (e+f x))}{a (i c-d)^3 (c-i d)^2 f}+\frac {(c-3 i d) d}{2 a (c-i d) (c+i d)^2 f (c+d \tan (e+f x))}-\frac {1}{2 (i c-d) f (a+i a \tan (e+f x)) (c+d \tan (e+f x))} \\ \end{align*}
Time = 5.17 (sec) , antiderivative size = 223, normalized size of antiderivative = 1.10 \[ \int \frac {1}{(a+i a \tan (e+f x)) (c+d \tan (e+f x))^2} \, dx=\frac {\frac {2 \log (i-\tan (e+f x))}{i c-d}-\frac {2 \log (i+\tan (e+f x))}{i c+d}+\frac {4 d \log (c+d \tan (e+f x))}{c^2+d^2}+\frac {2}{(-i+\tan (e+f x)) (c+d \tan (e+f x))}+(c-3 i d) \left (\frac {i \log (i-\tan (e+f x))}{(c+i d)^2}-\frac {i \log (i+\tan (e+f x))}{(c-i d)^2}+\frac {2 d \left (-2 c \log (c+d \tan (e+f x))+\frac {c^2+d^2}{c+d \tan (e+f x)}\right )}{\left (c^2+d^2\right )^2}\right )}{4 a (c+i d) f} \]
[In]
[Out]
Time = 0.55 (sec) , antiderivative size = 358, normalized size of antiderivative = 1.77
method | result | size |
derivativedivides | \(-\frac {i d^{2} c^{2}}{f a \left (i d -c \right )^{2} \left (i d +c \right )^{3} \left (c +d \tan \left (f x +e \right )\right )}-\frac {i d^{4}}{f a \left (i d -c \right )^{2} \left (i d +c \right )^{3} \left (c +d \tan \left (f x +e \right )\right )}+\frac {3 i d^{2} \ln \left (c +d \tan \left (f x +e \right )\right ) c}{f a \left (i d -c \right )^{2} \left (i d +c \right )^{3}}+\frac {d^{3} \ln \left (c +d \tan \left (f x +e \right )\right )}{f a \left (i d -c \right )^{2} \left (i d +c \right )^{3}}-\frac {i \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) c}{8 f a \left (i d +c \right )^{3}}+\frac {5 \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) d}{8 f a \left (i d +c \right )^{3}}+\frac {\arctan \left (\tan \left (f x +e \right )\right ) c}{4 f a \left (i d +c \right )^{3}}+\frac {5 i \arctan \left (\tan \left (f x +e \right )\right ) d}{4 f a \left (i d +c \right )^{3}}+\frac {1}{2 f a \left (i d +c \right )^{2} \left (\tan \left (f x +e \right )-i\right )}+\frac {i \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{8 f a \left (i d -c \right )^{2}}+\frac {\arctan \left (\tan \left (f x +e \right )\right )}{4 f a \left (i d -c \right )^{2}}\) | \(358\) |
default | \(-\frac {i d^{2} c^{2}}{f a \left (i d -c \right )^{2} \left (i d +c \right )^{3} \left (c +d \tan \left (f x +e \right )\right )}-\frac {i d^{4}}{f a \left (i d -c \right )^{2} \left (i d +c \right )^{3} \left (c +d \tan \left (f x +e \right )\right )}+\frac {3 i d^{2} \ln \left (c +d \tan \left (f x +e \right )\right ) c}{f a \left (i d -c \right )^{2} \left (i d +c \right )^{3}}+\frac {d^{3} \ln \left (c +d \tan \left (f x +e \right )\right )}{f a \left (i d -c \right )^{2} \left (i d +c \right )^{3}}-\frac {i \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) c}{8 f a \left (i d +c \right )^{3}}+\frac {5 \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) d}{8 f a \left (i d +c \right )^{3}}+\frac {\arctan \left (\tan \left (f x +e \right )\right ) c}{4 f a \left (i d +c \right )^{3}}+\frac {5 i \arctan \left (\tan \left (f x +e \right )\right ) d}{4 f a \left (i d +c \right )^{3}}+\frac {1}{2 f a \left (i d +c \right )^{2} \left (\tan \left (f x +e \right )-i\right )}+\frac {i \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{8 f a \left (i d -c \right )^{2}}+\frac {\arctan \left (\tan \left (f x +e \right )\right )}{4 f a \left (i d -c \right )^{2}}\) | \(358\) |
norman | \(\frac {\frac {1}{2 a f \left (-i c +d \right )}+\frac {c \left (3 i c^{2} d -3 i d^{3}+c^{3}+3 c \,d^{2}\right ) x}{2 \left (-i d +c \right )^{2} \left (i d +c \right )^{3} a}+\frac {c \left (3 i c^{2} d -3 i d^{3}+c^{3}+3 c \,d^{2}\right ) x \left (\tan ^{2}\left (f x +e \right )\right )}{2 \left (-i d +c \right )^{2} \left (i d +c \right )^{3} a}+\frac {d \left (3 i c^{2} d -3 i d^{3}+c^{3}+3 c \,d^{2}\right ) x \tan \left (f x +e \right )}{2 \left (-i d +c \right )^{2} \left (i d +c \right )^{3} a}+\frac {d \left (3 i c^{2} d -3 i d^{3}+c^{3}+3 c \,d^{2}\right ) x \left (\tan ^{3}\left (f x +e \right )\right )}{2 \left (-i d +c \right )^{2} \left (i d +c \right )^{3} a}+\frac {\left (3 i d^{3}+c^{3}\right ) \tan \left (f x +e \right )}{2 a f \left (-i d +c \right ) \left (i d +c \right )^{2} c}+\frac {d \left (i c d +3 d^{2}\right ) \left (\tan ^{3}\left (f x +e \right )\right )}{2 a \left (i c +d \right ) \left (-i c +d \right )^{2} f c}}{\left (c +d \tan \left (f x +e \right )\right ) \left (1+\tan ^{2}\left (f x +e \right )\right )}+\frac {i d^{2} \left (3 i c +d \right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2 a f \left (-i c^{5}-2 i c^{3} d^{2}-i c \,d^{4}+c^{4} d +2 c^{2} d^{3}+d^{5}\right )}-\frac {i d^{2} \left (3 i c +d \right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{a f \left (-i c^{5}-2 i c^{3} d^{2}-i c \,d^{4}+c^{4} d +2 c^{2} d^{3}+d^{5}\right )}\) | \(480\) |
risch | \(-\frac {x}{2 a \left (2 i c d -c^{2}+d^{2}\right )}+\frac {i {\mathrm e}^{-2 i \left (f x +e \right )}}{4 a \left (2 i c d +c^{2}-d^{2}\right ) f}+\frac {6 d^{2} c x}{a \left (i c^{4} d +2 i c^{2} d^{3}+i d^{5}+c^{5}+2 c^{3} d^{2}+c \,d^{4}\right )}+\frac {6 d^{2} c e}{a f \left (i c^{4} d +2 i c^{2} d^{3}+i d^{5}+c^{5}+2 c^{3} d^{2}+c \,d^{4}\right )}-\frac {2 i d^{3} x}{a \left (i c^{4} d +2 i c^{2} d^{3}+i d^{5}+c^{5}+2 c^{3} d^{2}+c \,d^{4}\right )}-\frac {2 i d^{3} e}{a f \left (i c^{4} d +2 i c^{2} d^{3}+i d^{5}+c^{5}+2 c^{3} d^{2}+c \,d^{4}\right )}-\frac {2 i d^{3}}{\left (-i c +d \right )^{2} f a \left (i c +d \right )^{2} \left ({\mathrm e}^{2 i \left (f x +e \right )} d +i c \,{\mathrm e}^{2 i \left (f x +e \right )}-d +i c \right )}+\frac {3 i d^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i d +c}{i d -c}\right ) c}{a f \left (i c^{4} d +2 i c^{2} d^{3}+i d^{5}+c^{5}+2 c^{3} d^{2}+c \,d^{4}\right )}+\frac {d^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i d +c}{i d -c}\right )}{a f \left (i c^{4} d +2 i c^{2} d^{3}+i d^{5}+c^{5}+2 c^{3} d^{2}+c \,d^{4}\right )}\) | \(493\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 329, normalized size of antiderivative = 1.63 \[ \int \frac {1}{(a+i a \tan (e+f x)) (c+d \tan (e+f x))^2} \, dx=\frac {i \, c^{4} + 2 i \, c^{2} d^{2} + i \, d^{4} + 2 \, {\left (c^{4} + 2 i \, c^{3} d + 12 \, c^{2} d^{2} - 14 i \, c d^{3} - 5 \, d^{4}\right )} f x e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (i \, c^{4} + 2 \, c^{3} d - 6 \, c d^{3} - 9 i \, d^{4} + 2 \, {\left (c^{4} + 4 i \, c^{3} d + 6 \, c^{2} d^{2} + 4 i \, c d^{3} + 5 \, d^{4}\right )} f x\right )} e^{\left (2 i \, f x + 2 i \, e\right )} - 4 \, {\left ({\left (-3 i \, c^{2} d^{2} - 4 \, c d^{3} + i \, d^{4}\right )} e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (-3 i \, c^{2} d^{2} + 2 \, c d^{3} - i \, d^{4}\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \log \left (\frac {{\left (i \, c + d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c - d}{i \, c + d}\right )}{4 \, {\left ({\left (a c^{6} + 3 \, a c^{4} d^{2} + 3 \, a c^{2} d^{4} + a d^{6}\right )} f e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (a c^{6} + 2 i \, a c^{5} d + a c^{4} d^{2} + 4 i \, a c^{3} d^{3} - a c^{2} d^{4} + 2 i \, a c d^{5} - a d^{6}\right )} f e^{\left (2 i \, f x + 2 i \, e\right )}\right )}} \]
[In]
[Out]
Time = 12.98 (sec) , antiderivative size = 510, normalized size of antiderivative = 2.52 \[ \int \frac {1}{(a+i a \tan (e+f x)) (c+d \tan (e+f x))^2} \, dx=- \frac {2 d^{3}}{a c^{5} f + i a c^{4} d f + 2 a c^{3} d^{2} f + 2 i a c^{2} d^{3} f + a c d^{4} f + i a d^{5} f + \left (a c^{5} f e^{2 i e} - i a c^{4} d f e^{2 i e} + 2 a c^{3} d^{2} f e^{2 i e} - 2 i a c^{2} d^{3} f e^{2 i e} + a c d^{4} f e^{2 i e} - i a d^{5} f e^{2 i e}\right ) e^{2 i f x}} + \frac {x \left (c + 5 i d\right )}{2 a c^{3} + 6 i a c^{2} d - 6 a c d^{2} - 2 i a d^{3}} + \begin {cases} \frac {i e^{- 2 i f x}}{4 a c^{2} f e^{2 i e} + 8 i a c d f e^{2 i e} - 4 a d^{2} f e^{2 i e}} & \text {for}\: 4 a c^{2} f e^{2 i e} + 8 i a c d f e^{2 i e} - 4 a d^{2} f e^{2 i e} \neq 0 \\x \left (- \frac {c + 5 i d}{2 a c^{3} + 6 i a c^{2} d - 6 a c d^{2} - 2 i a d^{3}} + \frac {c e^{2 i e} + c + 5 i d e^{2 i e} + i d}{2 a c^{3} e^{2 i e} + 6 i a c^{2} d e^{2 i e} - 6 a c d^{2} e^{2 i e} - 2 i a d^{3} e^{2 i e}}\right ) & \text {otherwise} \end {cases} + \frac {i d^{2} \cdot \left (3 c - i d\right ) \log {\left (\frac {c + i d}{c e^{2 i e} - i d e^{2 i e}} + e^{2 i f x} \right )}}{a f \left (c - i d\right )^{2} \left (c + i d\right )^{3}} \]
[In]
[Out]
Exception generated. \[ \int \frac {1}{(a+i a \tan (e+f x)) (c+d \tan (e+f x))^2} \, dx=\text {Exception raised: RuntimeError} \]
[In]
[Out]
none
Time = 0.49 (sec) , antiderivative size = 323, normalized size of antiderivative = 1.60 \[ \int \frac {1}{(a+i a \tan (e+f x)) (c+d \tan (e+f x))^2} \, dx=-\frac {\frac {8 \, {\left (-3 i \, c d^{3} - d^{4}\right )} \log \left (d \tan \left (f x + e\right ) + c\right )}{a c^{5} d + i \, a c^{4} d^{2} + 2 \, a c^{3} d^{3} + 2 i \, a c^{2} d^{4} + a c d^{5} + i \, a d^{6}} + \frac {2 \, {\left (i \, c - 5 \, d\right )} \log \left (\tan \left (f x + e\right ) - i\right )}{a c^{3} + 3 i \, a c^{2} d - 3 \, a c d^{2} - i \, a d^{3}} + \frac {16 \, \log \left (\tan \left (f x + e\right ) + i\right )}{8 i \, a c^{2} + 16 \, a c d - 8 i \, a d^{2}} - \frac {i \, c^{2} d \tan \left (f x + e\right )^{2} - 2 \, c d^{2} \tan \left (f x + e\right )^{2} - i \, d^{3} \tan \left (f x + e\right )^{2} + i \, c^{3} \tan \left (f x + e\right ) + 3 \, c^{2} d \tan \left (f x + e\right ) - 15 i \, c d^{2} \tan \left (f x + e\right ) - 13 \, d^{3} \tan \left (f x + e\right ) + 5 \, c^{3} - 6 i \, c^{2} d - 13 \, c d^{2} + 8 i \, d^{3}}{{\left (a c^{4} + 2 \, a c^{2} d^{2} + a d^{4}\right )} {\left (d \tan \left (f x + e\right )^{2} + c \tan \left (f x + e\right ) - i \, d \tan \left (f x + e\right ) - i \, c\right )}}}{8 \, f} \]
[In]
[Out]
Time = 10.50 (sec) , antiderivative size = 1334, normalized size of antiderivative = 6.60 \[ \int \frac {1}{(a+i a \tan (e+f x)) (c+d \tan (e+f x))^2} \, dx=\text {Too large to display} \]
[In]
[Out]